<!DOCTYPE html>
<html <?php language_attributes(); ?>>
<head>
	<meta charset="<?php bloginfo('charset'); ?>" />
	<title><?php wp_title( '|', true, 'right' ); ?></title>
	<script>document.documentElement.className += " js";</script>
	<link rel="shortcut icon" href="<?php bloginfo('template_directory'); ?>/img/fav-bierden.ico" type="image/vnd.microsoft.icon" /> 
	<?php wp_enqueue_script("jQuery");?>
	<?php wp_head(); ?>
	
</head>

<!--[if lt IE 7]><body <?php body_class('ie7 ie6'); ?>><![endif]-->
<!--[if IE 7]><body <?php body_class('ie7'); ?>><![endif]-->
<!--[if gt IE 7]><body <?php body_class(); ?>><![endif]-->
<!--[if !IE]><!--><body <?php body_class(); ?>><!-- <![endif]-->

<div id="page" class="hfeed site">
	<header id="masthead" class="site-header" role="banner">
		<hgroup>
			<?php
				// Check to see if the header image has been removed
				$header_image = get_header_image();
				if ( ! empty( $header_image ) ) {
			?>
			<a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home">
				<img id="header-image" src="<?php header_image(); ?>" width="<?php echo get_custom_header()->width; ?>" height="<?php echo get_custom_header()->height; ?>" alt="header image" />
			</a>
			<?php } ?>
			<h1 class="site-title"><a href="<?php echo home_url( '/' ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></h1>
			<h2 class="site-description"><?php bloginfo( 'description' ); ?></h2>
		</hgroup>
		
		<div id="middle">
			<nav role="navigation" class="site-navigation main-navigation">
				<h1 class="assistive-text"><?php _e( 'Menu', 'tsv-bierden' ); ?></h1>
				<div class="assistive-text skip-link"><a href="#content" title="<?php esc_attr_e( 'Skip to content', 'tsv-bierden' ); ?>"><?php _e( 'Skip to content', 'tsv-bierden' ); ?></a></div>
	
				<?php wp_nav_menu( array( 'theme_location' => 'primary' ) ); ?>
			</nav>
			<?php 
			if (is_home()) {
				$options = get_option( 'bierden_theme_media_options' );
				if( isset( $options['header_image'] ) && !empty($options)) {
					echo '<div id="front-image"><img src="' . $options['header_image'] . '" alt="header image"></div>';
				}
			} ?>
		</div>
		<?php  if (is_home() == true || is_front_page() == true) {
			get_sidebar('top');
		} ?>
		
	</header><!-- #masthead .site-header -->
    <div class="clear"></div>
	<div id="main">